//
//  DataBaseManager.h
//  WCDB_Demo
//
//  Created by lxj on 2018/7/25.
//  Copyright © 2018年 lxj. All rights reserved.
//

#import <Foundation/Foundation.h>

#define TABLE_WCDB_NAME NSStringFromClass([self class])
#define TABLE_WCDB_CLASS(className) NSClassFromString(className)
@interface DataBaseManager : NSObject

+ (DataBaseManager *)sharedInstance;
- (id)dataBase;
- (void)createDataBase;


/**
 增

 @param object 对象
 @param tableName 表名
 */
- (void)insertObject:(id)object into:(NSString *)tableName;

/**
 查

 @param className 类
 @param tableName 表名
 @return 数组
 */
- (NSArray *)getAllObjectsOfClass:(Class)className tableName:(NSString *)tableName;

/**
 删

 @param tableName 表名
 @return 结果
 */
- (BOOL)deleteAllObjectsFromTable:(NSString *)tableName;
@end
